package com.example.dqnm.controller;

import com.example.dqnm.pojo.Store;
import com.example.dqnm.pojo.ajaxResult;
import com.example.dqnm.service.storeService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequiredArgsConstructor
@RestController
@RequestMapping("/store")
public class storeController {
    @Autowired
    private storeService storeServicePo;

    @GetMapping("/findAllStore")
    public ajaxResult<List<Store>> findAllStore() {
        List<Store> array = storeServicePo.findAllStore();
        return new ajaxResult<>(array);
    }
}
